package br.com.jpoker.common.ui.menu;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JMenu;
import javax.swing.JMenuBar;
import javax.swing.JMenuItem;

import br.com.jpoker.common.ui.PokerTableFrame;
import br.com.jpoker.model.Table;

@SuppressWarnings("serial")
public class MainMenuBar extends JMenuBar {

	public MainMenuBar() {

		JMenu menu = new JMenu("Principal");
		JMenuItem menuItem = new JMenuItem("Jogar");
		menuItem.addActionListener(new ActionListener() {
		
			@Override
			public void actionPerformed(ActionEvent e) {
				new PokerTableFrame(new Table()).setVisible(true);
			}
		
		});
		menu.add(menuItem);
		
		add(menu);
	}
}
